"use strict";

module.exports = (app) => {
  const { STRING, INTEGER, DATE } = app.Sequelize;

  const User = app.model.define("user", {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    name: { type: STRING, allowNull: false },
    email: { type: STRING, allowNull: false, unique: true },
    organization: { type: STRING, allowNull: false },
    researchField: { type: STRING, allowNull: false },
    password: STRING,
    role: STRING
  },);

  return User;
};
